package com.ctshk.sapp.order.localfun.controller;


import com.ctshk.common.dto.Result;
import com.ctshk.common.enums.OperationLogModel;
import com.ctshk.common.model.PageResponse;
import com.ctshk.common.web.support.BaseController;
import com.ctshk.rpc.system.dto.OperationLogDTO;
import com.ctshk.rpc.system.req.OperationLogReq;
import com.ctshk.rpc.system.service.IOperationLogService;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 操作日志表 前端控制器
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-02-24
 */
@RestController
@RequestMapping("/operation-log")
public class OperationLogController extends BaseController {

    @DubboReference
    private IOperationLogService iOperationLogService;

    @ApiOperation(value = "操作记录", notes = "操作记录")
    @PostMapping(value = "/list")
    public Result<PageResponse<OperationLogDTO>> queryList(@RequestBody OperationLogReq operationLogListReq) {
        operationLogListReq.setModel(OperationLogModel.ORDER.getModel());
        return iOperationLogService.list(operationLogListReq);
    }
}
